/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package vernotte.alexandre.idm.projet.model.kaosgoalmodel.KaosGoalModel.impl;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EFactoryImpl;

import org.eclipse.emf.ecore.plugin.EcorePlugin;

import vernotte.alexandre.idm.projet.model.kaosgoalmodel.KaosGoalModel.*;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class KaosGoalModelFactoryImpl extends EFactoryImpl implements KaosGoalModelFactory {
	/**
	 * Creates the default factory implementation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static KaosGoalModelFactory init() {
		try {
			KaosGoalModelFactory theKaosGoalModelFactory = (KaosGoalModelFactory)EPackage.Registry.INSTANCE.getEFactory("KaosGoalModel"); 
			if (theKaosGoalModelFactory != null) {
				return theKaosGoalModelFactory;
			}
		}
		catch (Exception exception) {
			EcorePlugin.INSTANCE.log(exception);
		}
		return new KaosGoalModelFactoryImpl();
	}

	/**
	 * Creates an instance of the factory.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public KaosGoalModelFactoryImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
			case KaosGoalModelPackage.ALTERNATIVE: return createAlternative();
			case KaosGoalModelPackage.REQUIREMENT: return createRequirement();
			case KaosGoalModelPackage.GOAL: return createGoal();
			case KaosGoalModelPackage.EXPECTATION: return createExpectation();
			case KaosGoalModelPackage.DOMAIN_PROPERTY: return createDomainProperty();
			case KaosGoalModelPackage.DOMAIN_HYPOTHESE: return createDomainHypothese();
			case KaosGoalModelPackage.DOMAIN_INVARIANT: return createDomainInvariant();
			case KaosGoalModelPackage.AGENT: return createAgent();
			case KaosGoalModelPackage.GOAL_MODEL: return createGoalModel();
			default:
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Alternative createAlternative() {
		AlternativeImpl alternative = new AlternativeImpl();
		return alternative;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Requirement createRequirement() {
		RequirementImpl requirement = new RequirementImpl();
		return requirement;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Goal createGoal() {
		GoalImpl goal = new GoalImpl();
		return goal;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Expectation createExpectation() {
		ExpectationImpl expectation = new ExpectationImpl();
		return expectation;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public DomainProperty createDomainProperty() {
		DomainPropertyImpl domainProperty = new DomainPropertyImpl();
		return domainProperty;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public DomainHypothese createDomainHypothese() {
		DomainHypotheseImpl domainHypothese = new DomainHypotheseImpl();
		return domainHypothese;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public DomainInvariant createDomainInvariant() {
		DomainInvariantImpl domainInvariant = new DomainInvariantImpl();
		return domainInvariant;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Agent createAgent() {
		AgentImpl agent = new AgentImpl();
		return agent;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public GoalModel createGoalModel() {
		GoalModelImpl goalModel = new GoalModelImpl();
		return goalModel;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public KaosGoalModelPackage getKaosGoalModelPackage() {
		return (KaosGoalModelPackage)getEPackage();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @deprecated
	 * @generated
	 */
	public static KaosGoalModelPackage getPackage() {
		return KaosGoalModelPackage.eINSTANCE;
	}

} //KaosGoalModelFactoryImpl
